home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Burning & Media
/
GB-PVR 1.2.13
/
GBPVR10213.msi
/
Cabs.w1.cab
/
GuideListingChannel.cs501
< prev
next >
Wrap
Text File
|
2008-02-22
|
7KB
|
212 lines
/// <summary>
/// This object is used to format the first block of the guide which contains the channel information
/// </summary>
namespace gbweb.classes
{
public class GuideListingChannel
{
private const string fill0 = "<div class=\"";
private string displayClass = "channelInfoLogoAndText";
private string fill1 = "\" title=\"";
private string displayTitle = "";
private const string fill2 = "\" style=\"width:";
private int displayWidth = 8;
private const string fill3 = "%\">";
private const string fill4 = "<div class=\"nameAndNumber\"><a href=\"";
private string channelHref = "";
private const string fill5 = ">";
private string channelNumber = "";
private const string fill6 = " ";
private string channelName = "";
private const string fill7 = "</a></div>\n";
private const string fill8 = "<div class=\"channelLogo\"> <a href=\"";
private string channelLogoHref = "";
private const string fill9 = "\"><img src=\"";
private string channelLogoImgSrc = "";
private const string fill10 = "\" width=\"";
private int channelLogoImgWidth = 90;
private const string fill11 = "% hspace=\"";
private int channelLogoImgHspace = 0;
private const string fill12 = "\" vspace=\"";
private int channelLogoImgVspace = 0;
private const string fill13 = "\" border=\"";
private int channelLogoImgBorder = 1;
private const string fill14 = "\"></a></div>\n";
private const string fill15 = "</div>\n";
public GuideListingChannel()
{
}
public GuideListingChannel(string DisplayClass, string DisplayTitle, int DisplayWidth,
string ChannelHref, string ChannelName, string ChannelNumber,
string ChannelLogoHref, string ChannelLogoImgSrc, int ChannelLogoImgWidth,
int ChannelLogoImgHspace, int ChannelLogoImgVspace, int ChannelLogoImgBorder)
{
displayClass = DisplayClass;
displayTitle = DisplayTitle;
displayWidth = DisplayWidth;
channelHref = ChannelHref;
channelName = ChannelName;
channelNumber = ChannelNumber;
channelLogoHref = ChannelLogoHref;
channelLogoImgSrc = ChannelLogoImgSrc;
channelLogoImgWidth = ChannelLogoImgWidth;
channelLogoImgHspace = ChannelLogoImgHspace;
channelLogoImgVspace = ChannelLogoImgVspace;
channelLogoImgBorder = ChannelLogoImgBorder;
}
public string getChannelLine()
{
string returnLine = string.Empty;
returnLine += fill0;
returnLine += displayClass;
returnLine += fill1;
returnLine += displayTitle;
returnLine += fill2;
returnLine += displayWidth;
returnLine += fill3;
if (displayClass == "channelInfoLogoAndText" || displayClass == "channelInfo")
{
returnLine += fill4;
returnLine += channelHref;
returnLine += fill5;
returnLine += channelName;
returnLine += fill6;
returnLine += channelNumber;
returnLine += fill7;
}
if (displayClass == "channelInfoLogoAndText" || displayClass == "channelInfoLogoOnly")
{
returnLine += fill8;
returnLine += channelLogoHref;
returnLine += fill9;
returnLine += channelLogoImgSrc;
returnLine += fill10;
returnLine += channelLogoImgWidth;
returnLine += fill11;
returnLine += channelLogoImgHspace;
returnLine += fill12;
returnLine += channelLogoImgVspace;
returnLine += fill13;
returnLine += channelLogoImgBorder;
returnLine += fill14;
}
returnLine += fill15;
return returnLine;
}
public string getDisplayClass()
{
return displayClass;
}
public void setDisplayClass(string a)
{
displayClass = a;
}
public string getDisplayTitle()
{
return displayTitle;
}
public void setDisplayTitle(string a)
{
displayTitle = a;
}
public int getDisplayWidth()
{
return displayWidth;
}
public void setDisplayWidth(int a)
{
displayWidth = a;
}
public string getChannelHref()
{
return channelHref;
}
public void setChannelHref(string a)
{
channelHref = a;
}
public string getChannelName()
{
return channelName;
}
public void setChannelName(string a)
{
channelName = a;
}
public string getChannelNumber()
{
return channelNumber;
}
public void setChannelNumber(string a)
{
channelNumber = a;
}
public string getChannelLogoHRef()
{
return channelLogoHref;
}
public void setChannelLogHref(string a)
{
channelLogoHref = a;
}
public string getChannelLogoImgSrc()
{
return channelLogoImgSrc;
}
public void setChannelLogoImgSrc(string a)
{
channelLogoImgSrc = a;
}
public int getChannelLogoImgWidth()
{
return channelLogoImgWidth;
}
public void setChannelLogoImgWidth(int a)
{
channelLogoImgWidth = a;
}
public int getChannelLogoImgHspace()
{
return channelLogoImgHspace;
}
public void setChannelLogoImgHspace(int a)
{
channelLogoImgHspace = a;
}
public int getChannelLogoImgVspace()
{
return channelLogoImgVspace;
}
public void setChannelLogoImgVspace(int a)
{
channelLogoImgVspace = a;
}
public int getChannelLogoImgBorder()
{
return channelLogoImgBorder;
}
public void setChannelLogoImgBorder(int a)
{
channelLogoImgBorder = a;
}
}
}